package cn.iocoder.yudao.module.erp.dal.mysql.business.order.orderaddress;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.erp.controller.admin.business.order.orderaddress.vo.OrderAddressPageReqVO;
import cn.iocoder.yudao.module.erp.dal.dataobject.business.order.orderaddress.OrderAddressDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 交付地址 Mapper
 *
 * @author yy
 */
@Mapper
public interface OrderAddressMapper extends BaseMapperX<OrderAddressDO> {

    default PageResult<OrderAddressDO> selectPage(OrderAddressPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderAddressDO>()
                .likeIfPresent(OrderAddressDO::getName, reqVO.getName())
                .betweenIfPresent(OrderAddressDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OrderAddressDO::getId));
    }

}